package factorydemo.methodfactory;

import factorydemo.BMW;

public class Test {

    public static void main(String[] args) {
        IFactory bmw320Factory = new BMW320Factory();
        BMW bmw320 = bmw320Factory.createBMW();
        bmw320.run();

        IFactory bmw520Factory = new BMW320Factory();
        BMW bmw520 = bmw520Factory.createBMW();
        bmw520.run();
    }
}
